<?php 
    if($data->isImage) $this->renderPartial('../image/_view', array('data' => $data->image));
    elseif($data->isVideo) $this->renderPartial('../video/_view', array('data' => $data->video));
    elseif($data->isJoke) $this->renderPartial('../joke/_view', array('data' => $data->joke));
?>